<div class="publish-header">
  <div>
    <span class="date" *ngIf="saveStatus==1" style="color: green;">正在保存。。。</span>
    <span class="date" *ngIf="saveStatus==2">已保存 : {{date | date:'y-MM-dd HH:mm:ss'}}</span>
    <button class="save-btn" (click)="save()">
      <md-icon>save</md-icon>
    </button>
  </div>
  <button class='p-btn' (click)="submit()">{{publishFlag}}</button>
</div>
<div class="publish-main">
  <!-- 封面图片 -->
  <div class="cover-img-container">
    <div class="input-file" *ngIf="!coverImageUrl">
      <form action="" enctype="multipart/form-data" method="post">
          <input type="file" accept="image/jpg,image/png,image/jpeg" id="file" (change)="onChangeSelectFile($event)">
      </form>
      <label for="file">
          <svg t="1525576993158" class="icon" style="width: 50px;height: 50px;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M788.48 844.8H235.52c-45.056 0-81.92-36.864-81.92-81.92v-317.44c0-45.056 36.864-81.92 81.92-81.92h31.744c17.408 0 31.744-10.24 37.888-25.6l1.024-3.072 22.528-38.912c13.312-30.72 41.984-50.176 75.776-50.176h212.992c33.792 0 62.464 19.456 75.776 50.176l24.576 41.984c6.144 15.36 21.504 25.6 37.888 25.6H788.48c45.056 0 81.92 36.864 81.92 81.92v317.44c0 45.056-36.864 81.92-81.92 81.92z m-552.96-440.32c-22.528 0-40.96 18.432-40.96 40.96v317.44c0 22.528 18.432 40.96 40.96 40.96h552.96c22.528 0 40.96-18.432 40.96-40.96v-317.44c0-22.528-18.432-40.96-40.96-40.96h-31.744c-33.792 0-62.464-19.456-75.776-50.176l-24.576-41.984c-6.144-15.36-20.48-25.6-37.888-25.6H405.504c-17.408 0-31.744 10.24-37.888 25.6l-1.024 3.072-22.528 38.912c-13.312 30.72-41.984 50.176-75.776 50.176H235.52z" fill="" p-id="2315"></path><path d="M512 747.52c-87.04 0-158.72-71.68-158.72-158.72S424.96 430.08 512 430.08s158.72 71.68 158.72 158.72S599.04 747.52 512 747.52z m0-276.48c-64.512 0-117.76 53.248-117.76 117.76S447.488 706.56 512 706.56s117.76-53.248 117.76-117.76S576.512 471.04 512 471.04z" fill="" p-id="2316"></path></svg>
      </label>
    </div>
    <div class="cover-img" *ngIf="coverImageUrl">
      <img [src]="coverImageUrl">
      <i class="remove-img" (click)="removeCoverImage()">
        <md-icon>close</md-icon>
      </i>
    </div>
  </div>
  <!--标题-->
  <div class="publish-title">
    <input type="text" [(ngModel)]="publishTitle" placeholder="输入标题">
  </div>
  <!-- 编辑器 -->
  <div class="editor-container">
    <form role="form" #form="ngForm">
      <e-ngx-editor name="editorData" [(ngModel)]="editorData"
                    #editor="ngModel"
                    required>
      </e-ngx-editor>
    </form>
  </div>
</div>
